var webpack = require('webpack');

var config = {
   entry: './src/js/main.js',

   output: {
      path:'./static/js/',
      filename: 'main.js',
   },

   devServer: {
      inline: true,
      port: 7777
   },

   module: {
      loaders: [
      {
         test: /\.jsx?$/,
         exclude: /node_modules/,
         loader: 'babel',
         query: {
            presets: ['es2015', 'react']
         }
      }
      ,
      {test: /\.css$/, loader: 'style!css'},
      {test: /\.scss$/, loader: 'style!css!sass'},
    ]
   },
   plugins: [
     new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false,
      },
      compress: {
        warnings: false
      }
    }),
    new webpack.DefinePlugin({
      'process.env':{
        'NODE_ENV': JSON.stringify('production')
      }
    })
   ]
}

module.exports = config;
